<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>修德抄经堂</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<link rel="stylesheet" type="text/css" href="../bower_components/mui/dist/css/mui.min.css">
	<link rel="stylesheet" type="text/css" href="../css/base.css">
	<link rel="stylesheet" type="text/css" href="../css/over.css">
	<link rel="stylesheet" type="text/css" href="../css/tongxiu.css">
	<link rel="stylesheet" type="text/css" href="../css/full.css">
	<script src="../bower_components/mui/dist/js/mui.js"></script>
	<script src="../bower_components/jquery/dist/jquery.js"></script>
	<script src="../js/common.js"></script>
</head>
<body>
	<div class="page">
		<!--<header class="mui-bar mui-bar-nav title">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"><span>返回</span></a>
	      	<h1 class="mui-title">道德抄经堂</h1>
	    </header>-->
	    <div class="content">
	    	<div class="topic">
		    	<div class="top">
		    		<h4 class="same">《心经》王羲之行书线装本</h4>
	    		</div>
	    		<div class="bottom">
		    		<p class="one fang">助抄人<span>10</span>人</p>
	    			<p class="two fang">助抄页<span>10</span>页</p>
	    		</div>
	    	</div>
	    	<div class="wrap">
	    		<div class="xiu">
	    			<div class="xiu_pic">
	    				<img src="../img/xiu/pic.png" class="cover">
	    			</div>
	    			<div class="xiu_txt">
	    				<p class="same xiu_name">张某某</p>
	    				<div class="xiu_desc">
	    					<div class="left_tin">
	    					<img src="../img/xiu/left.png" class="cover">
	    					</div>
	    					<p>助抄<span>10页</span></p>
	    					<p>完成<span>第3、5、13页</span></p>
	    					<p>未完<span>第7页</span></p>
	    				</div>
	    			</div>
	    		</div>
	    		<div class="xiu">
	    			<div class="xiu_pic">
	    				<img src="../img/xiu/pic.png" class="cover">
	    			</div>
	    			<div class="xiu_txt">
	    				<p class="same xiu_name">张某某</p>
	    				<div class="xiu_desc">
	    					<div class="left_tin">
	    					<img src="../img/xiu/left.png" class="cover">
	    					</div>
	    					<p>助抄<span>10页</span></p>
	    					<p>完成<span>第3、5、13页</span></p>
	    					<p>未完<span>第7页</span></p>
	    				</div>
	    			</div>
	    		</div>
	    		<div class="xiu">
	    			<div class="xiu_pic">
	    				<img src="../img/xiu/pic.png" class="cover">
	    			</div>
	    			<div class="xiu_txt">
	    				<p class="same xiu_name">张某某</p>
	    				<div class="xiu_desc">
	    					<div class="left_tin">
	    					<img src="../img/xiu/left.png" class="cover">
	    					</div>
	    					<p>助抄<span>10页</span></p>
	    					<p>完成<span>第3、5、13页</span></p>
	    					<p>未完<span>第7页</span></p>
	    				</div>
	    			</div>
	    		</div>
	    		<div class="xiu">
	    			<div class="xiu_pic">
	    				<img src="../img/xiu/pic.png" class="cover">
	    			</div>
	    			<div class="xiu_txt">
	    				<p class="same xiu_name">张某某</p>
	    				<div class="xiu_desc">
	    					<div class="left_tin">
	    					<img src="../img/xiu/left.png" class="cover">
	    					</div>
	    					<p>助抄<span>10页</span></p>
	    					<p>完成<span>第3、5、13页</span></p>
	    					<p>未完<span>第7页</span></p>
	    				</div>
	    			</div>
	    		</div>
	    		<div class="xiu">
	    			<div class="xiu_pic">
	    				<img src="../img/xiu/pic.png" class="cover">
	    			</div>
	    			<div class="xiu_txt">
	    				<p class="same xiu_name">张某某</p>
	    				<div class="xiu_desc">
	    					<div class="left_tin">
	    					<img src="../img/xiu/left.png" class="cover">
	    					</div>
	    					<p>助抄<span>10页</span></p>
	    					<p>完成<span>第3、5、13页</span></p>
	    					<p>未完<span>第7页</span></p>
	    				</div>
	    			</div>
	    		</div>
	    	</div>
	    	<div class="btin">
	    		<img src="../img/btin.png" class="cover">
	    	</div>
	    	<div class="button" id="exit">
	    		<button class="cover">返回</button>
	    	</div>
	    </div>
	</div>
</body>
<script src="../bower_components/mui/dist/js/mui.min.js"></script>
<script>
	$('#exit').click(function(){
		history.back();
	})
</script>
<script>
	var userTranscriptionID = localStorage.getItem("userTranscriptionID");
	var html='';
	$('.wrap').empty();
	$.ajax({
		url: '/fe/assistance/user_transcription/'+userTranscriptionID+'/details',
		data: {
		},
		async: false,
		success: function (data) {
			var data = data.data;
			var assistant_user_count = data.assistant_user_count;
			var assistant_page_count = data.assistant_page_count;
			if(assistant_user_count==null) assistant_user_count=0;
			if(assistant_page_count==null) assistant_page_count=0;
			html='<div class="top">'+
					'<h4 class="same">'+data.sutra_name+'</h4>'+
			'</div>'+
			'<div class="bottom">'+
					'<p class="one fang">助抄人<span>'+assistant_user_count+'</span>人</p>'+
					'<p class="two fang">助抄页<span>'+assistant_page_count+'</span>页</p>'+
					'</div>'
			$('.topic').empty().append(html);
			for(var i=0;i<data.assistant_user_count;i++) {
				var a='';
				// if (data.users[i].finish_page_nums.length!=null){
				// 	a=0;
				// }
                for(var j=0;j<data.users[i].finish_page_nums.length;j++) {
                    if (j == data.users[i].finish_page_nums.length-1){
                        a+=data.users[i].finish_page_nums[j];
                    }
                    else a+=data.users[i].finish_page_nums[j]+'、'; 
                }
				var b='';
				for(var j=0;j<data.users[i].unfinish_page_nums.length;j++) {
				    if (j == data.users[i].unfinish_page_nums.length-1){
				    b+=data.users[i].unfinish_page_nums[j];
					}
					else{
						b+=data.users[i].unfinish_page_nums[j]+'、';
					}
				}

				var html1 ='<div class="xiu">'+
						'<div class="xiu_pic">'+
						'<img src="'+data.users[i].avatar_url+'" class="cover">'+
						'</div>'+
						'<div class="xiu_txt">'+
						'<p class="same xiu_name">'+data.users[i].nickname+'</p>'+
						'<div class="xiu_desc">'+
						'<div class="left_tin">'+
						'<img src="../img/xiu/left.png" class="cover">'+
						'</div>'+
						// '<p>助抄<span>'+data.users[i].page_count+'</span></p>'
					'<p>未完<span>'+b+'</span></p>'+
					'<p>完成<span>'+a+'</span></p>'+
					'</div>'+
					'</div>'+
					'</div>'
				$('.wrap').append(html1);
				}
			}
		})
</script>
</html>